Skip to content

Enable unreachable_pub lint in the scheduler - #1141

Merged
ia0 merged 2 commits into
google:mainfrom
56steve:enable-unreachable-pub-scheduler
Sep 2, 2026
Merged

ia0 merged 2 commits into
google:mainfrom
56steve:enable-unreachable-pub-scheduler

Conversation

@56steve

@56steve 56steve commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What

Enables the rust.unreachable_pub lint for the wasefire-scheduler crate:

  • Removes scheduler from the unreachable_pub exclusion list in scripts/sync.sh.
  • Adds rust.unreachable_pub = "warn" to crates/scheduler/Cargo.toml (matching the ordering sync.sh generates).
  • Restricts crate-internal items to pub(crate) across the call, event, applet, perf, and protocol modules. The crate's public API (lib.rs) is unchanged.
  • Adds a CHANGELOG entry.

Why

Continues the incremental work of #565 ("Fix all lints currently disabled in scripts/sync.sh"), following #1139 which enabled the same lint for the interpreter.

Verification

Ran the full feature/target matrix from crates/scheduler/test.sh on host:

  • cargo check --lib for: host wasm,std,log; i686-unknown-linux-gnu native,std(,log); thumbv7em-none-eabi wasm/pulley/native, each with and without defmt — all report zero unreachable_pub warnings.
  • cargo test --lib --features=_test,full-api,wasm,std passes.
  • cargo clippy and cargo fmt --check pass.

Note: the full Linux CI suite (scripts/ci.sh) was not run locally.

@56steve
56steve requested a review from ia0 as a code owner August 27, 2026 13:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables the unreachable_pub lint for the scheduler crate. It updates the configuration in Cargo.toml and scripts/sync.sh, documents the change in CHANGELOG.md, and refactors numerous public items across the scheduler codebase to use restricted visibility (such as pub(crate) or pub(super)) where appropriate. There are no review comments, and I have no additional feedback to provide.

@ia0

ia0 commented Aug 27, 2026

Copy link
Copy Markdown
Member

By the way, thanks for the PRs. I'm currently on vacation, but will review them when I'm back (some time end of next week).

Removes the scheduler from the unreachable_pub exclusion list in
scripts/sync.sh, adds the lint to crates/scheduler/Cargo.toml, and
restricts crate-internal items to pub(crate). The crate's public API
(lib.rs) is unchanged.

Continues the incremental work of google#565, following google#1139 (interpreter).

Verified on host: cargo check across all feature/target combinations from
crates/scheduler/test.sh (host wasm/std, i686 native, and thumbv7em
wasm/pulley/native with and without defmt) reports zero unreachable_pub
warnings; cargo test --lib, cargo clippy, and cargo fmt --check pass.
@56steve
56steve force-pushed the enable-unreachable-pub-scheduler branch from 5680345 to 7f3a3f3 Compare September 2, 2026 13:35
@56steve

56steve commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ia0, welcome back, and thanks for the review!

Same note as on the xtask PR: the sync failure here was only the rustup submodule drift, not this change. I've rebased onto the latest main (past #1144, rustup 1.29.1), so it's resolved. I re-verified every feature and target combination from scheduler/test.sh locally and they all come back with zero unreachable_pub warnings, plus tests, clippy and fmt are clean.

The fork PR seems to be waiting on a maintainer to approve the workflow run before CI runs again. Once you trigger it, it should pass. Thanks!

@ia0 ia0 added for:maintainability Improves maintainers life crate:scheduler Modifies the platform labels Sep 2, 2026
@ia0
ia0 merged commit fc5d707 into google:main Sep 2, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate:scheduler Modifies the platform for:maintainability Improves maintainers life

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants